#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "servo.h"
#include "action.h"
#include "voice.h"
#include "bluetooth.h"

int main(void)
{
	OLED_Init();
    servo_init();
    voice_init();
    BlueTooth_Init();
	OLED_ShowImage(0,0,128,64,Face_sleep);
	OLED_Update();
	
	while (1) {
        if (Action_Mode == enum_attention)       action_attention();    //立正
        else if (Action_Mode == enum_sleep)      action_sleep();        //睡觉
        else if (Action_Mode == enum_fall)       action_fall();         //趴下
        else if (Action_Mode == enum_squat)      action_squat();        //蹲下
        else if (Action_Mode == enum_wag_tail)   action_wag_tail();     //摇尾巴
        else if (Action_Mode == enum_swing)      action_swing();        //摇摆
        else if (Action_Mode == enum_handshake)  action_handshake();    //握手
        else if (Action_Mode == enum_sit)        action_squat();        //坐下
        else if (Action_Mode == enum_forward)    action_forward();      //前进
        else if (Action_Mode == enum_retreat)    action_retreat();      //后退
        else if (Action_Mode == enum_turn_left)  action_turn_left();    //左转
        else if (Action_Mode == enum_turn_right) action_turn_right();   //右转
    }
}
